package com.day09.Demo;

public class User {
    private String name;  // 用户名
    private double leftmoney;  // 余额

    // 构造器
    public User() {
    }

    public User(String name, double leftmoney) {
        this.name = name;
        this.leftmoney = leftmoney;
    }

    // get和set方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getLeftmoney() {
        return leftmoney;
    }

    public void setLeftmoney(double leftmoney) {
        this.leftmoney = leftmoney;
    }

    // 打印
    public void show() {
        System.out.println("姓名：" + this.name + "\t余额：" + this.leftmoney);
    }
}
